package util;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;

public class ReadText {
	
	private void read() {
		try {
			
			String line = "";
			InputStreamReader isr = new InputStreamReader(new FileInputStream("E:/readText/test.txt"), "utf-8");
			BufferedReader br = new BufferedReader(isr);
			while ((line = br.readLine()) != null) {
				StringBuffer document = new StringBuffer();
				document.append("insert into user_role values("+line+");");
				System.out.println(document.toString());
			}
			
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		ReadText instance = new ReadText();
		instance.read();
	}

}
